<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class HomeConfig extends Model
{
    const TYPE_IMAGE = 'image';
    const TYPE_MP4   = 'mp4';

    public static $typeMap = [
        self::TYPE_IMAGE => '图片',
        self::TYPE_MP4   => '视频',
    ];

    public function getMp4OrImageAttribute($value)
    {
        return getImageDomain($value);
    }
}
